<template>
	<div class="pdf-container">
	  <web-view :src="fileUrl" @onPostMessage="handlePostMessage"></web-view>
	</div>
</template>

<script>
	export default {
		name: "DrawPicture",
		props: {
		  fileUrl: {
		    type: String,
		    required: false,    //  目前没有后台接口，暂时设置为false,后台接口补充后将会改成true，调用此组件必须提供该参数
		  },
		},
		methods: {
			handlePostMessage(data) {
				// console.log("接收到消息：" + JSON.stringify(data.detail));
			}
		},
	}
</script>

<style lang="scss" scoped>
.pdf-container {
    height: 100%;
    width: 100%;
}
iframe {
  height: 100%;
  min-height: 480px;
  width: 100%;
}
</style>
